//
//  MTVerCodeApiManager.h
//  MeToo
//
//  Created by 俊松何 on 2018/7/5.
//  Copyright © 2018年 tianxie. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MTHttpTool.h"

#import "MMCountry.h"

@interface MTVerCodeApiManager : NSObject
+(instancetype)manager;


/**
 获取验证码
 
 @param countryCode 地区编码
 @param phone 手机号
 @param completionBlock 完成block
 */
-(void)getVerCode:(NSString *)countryCode
            phone:(NSString *)phone
       completion:(void (^)(MTError *mterror))completionBlock;

/**
 获取地区编码列表

 @param completionBlock 完成block
 */
-(void)getCountryCodesWithCompletion:(void (^)(NSMutableArray<MMCountry *> *codes, MTError *mterror))completionBlock;


/**
 获取默认地区编码

 @param completionBlock 完成block
 */
-(void)getDefaultCountryCodeWithCompletion:(void (^)(MMCountry *codes, MTError *mterror))completionBlock;



/**
 验证验证码是否正确

 @param phone 手机号
 @param countryCode 地区编码
 @param code 验证码
 @param completionBlock 完成block
 */
-(void)verifyCodeWithPhone:(NSString *)phone
               countryCode:(NSString *)countryCode
                      code:(NSString *)code
                completion:(void (^)(MTError *mterror))completionBlock;

@end
